package com.sfac.springboot.modules.test.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sfac.springboot.modules.common.entity.AbstractEntity;

import javax.persistence.*;

/**
 * @Description Card
 * @Author JiangHu
 * @Date 2022/8/19 10:53
 */
@Entity
@Table(name = "test_card")
public class Card extends AbstractEntity {
	private String cardNum;

	@OneToOne(mappedBy="studentCard", cascade= CascadeType.ALL)
	@JsonIgnore
	private Student student;

	public String getCardNum() {
		return cardNum;
	}

	public void setCardNum(String cardNum) {
		this.cardNum = cardNum;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}
}
